<template>
  <view class="webview-container">
    <web-view :src="url"></web-view>
  </view>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'

const url = ref('')

onLoad((option: any) => {
  if (option?.url) {
    url.value = decodeURIComponent(option.url)
  }
})
</script>

<style scoped lang="scss">
.webview-container {
  flex: 1;
  height: 100vh;
  width: 100vw;
}
</style>